home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / QuickTime VR / MacOS / QuickDraw™ 3D 1.0.6F4 SDK / Samples / SampleCode / Unsupported Libraries / PICTio.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-05  |  1.7 KB  |  72 lines  |  [TEXT/MPS ]

  1. /******************************************************************************
  2.  **                                                                             **
  3.  **     Module:        PICTio.h                                                 **
  4.  **                                                                          **
  5.  **                                                                          **
  6.  **     Purpose:     Stuff                                                      **
  7.  **                                                                          **
  8.  **                                                                          **
  9.  **                                                                          **
  10.  **     Copyright (C) 1991 Apple Computer, Inc.  All rights reserved.          **
  11.  **                                                                          **
  12.  **                                                                          **
  13.  *****************************************************************************/
  14. #ifndef PICTio_h
  15. #define PICTio_h
  16.  
  17.  
  18. #include <stdio.h>
  19.  
  20.  
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif    /* __cplusplus */
  24.  
  25.  
  26. /* These are the simple interfaces to read and write a PICT.
  27.  * They return 0 on error.
  28.  */
  29.  
  30. unsigned char *ErReadPICT(        /* Returns a pointer to the baseAddr */
  31.     long             *width,     /* Returns the width of the image */
  32.     long             *height,     /* Returns the height of the image */
  33.     long             *rowBytes,     /* Returns the rowBytes of the image */
  34.     FILE             *fd            /* The I/O descriptor */
  35. );
  36.  
  37. long ErWritePICT(
  38.     unsigned char     *baseAddr,    /* Pointer to {a,r,g,b},...{a,r,g,b} */
  39.     long             width,         /* Width of the image */
  40.     long             height,     /* Height of the image */
  41.     long             rowBytes,     /* Distance from one line to the next */
  42.     FILE             *fd            /* The file descriptor */
  43. );
  44.  
  45.  
  46. /* These are useful for writing a PICT file a few lines at a time.
  47.  * They return 0 on error.
  48.  * buf points to a list of pixels organized as:
  49.  * (a,r,g,b), (a,r,g,b), ...
  50.  */
  51. long StartWritePICT(
  52.     long             width, 
  53.     long             height, 
  54.     FILE             *fd);
  55.     
  56. long WritePICTLines(
  57.     unsigned char     *baseAddr, 
  58.     long             width, 
  59.     long             height, 
  60.     long             rowBytes, 
  61.     FILE             *fd);
  62.     
  63. long EndWritePICT(
  64.     FILE             *fd);
  65.  
  66.  
  67. #ifdef __cplusplus
  68. };
  69. #endif    /* __cplusplus */
  70.  
  71. #endif    /*  PICTio_h  */
  72.